package com.enterprise.struts2.admin;

import com.enterprise.domXml.XmlConfigure;
import com.enterprise.domain.WebConfigure;
import com.opensymphony.xwork2.ActionSupport;

public class ConfigurationAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String SiteTitle;
	private String SiteName;
	private String SiteUrl;
	private String Sitekey;
	private String Sitedes;
	private String EnterpriseMail;
	private String LogoUrl;
	private String WebmasterName;
	private String WebmasterEmail;
	private String Copyright;
	private int MaxPerPage_Default;
	private int New_count;
	private int Product_count;
	private int MaxPerPage_Search;
	private int MaxPerPage_Content;
	private boolean NewsComment;
	private boolean EnableProductCheck;
	private boolean EnableUploadFile;
	private boolean PopAnnounce;
	private int HitsOfHot;
	private int MaxFileSize;
	private String SavaUpFilesPath;
	private String UpFileType;
	private boolean DelUpFiles;
	private int SessionTimeout;
	public  XmlConfigure configure=new XmlConfigure(XmlConfigure.class.getClassLoader().getResource("SiteConfi.xml").getPath());
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		
		WebConfigure configure1=new WebConfigure(SiteTitle,  SiteName, SiteUrl,  Sitekey,  Sitedes,
				 EnterpriseMail,  LogoUrl,  WebmasterName,
				 WebmasterEmail,  Copyright,  MaxPerPage_Default,
				 New_count,  Product_count,  MaxPerPage_Search,
				 MaxPerPage_Content,  NewsComment,
				 EnableProductCheck,EnableUploadFile,
				 PopAnnounce,  HitsOfHot,  MaxFileSize,
				 SavaUpFilesPath,  UpFileType,  DelUpFiles,
				 SessionTimeout);
		
		return "success";
	}
	public ConfigurationAction() {
		super();
		// TODO Auto-generated constructor stub
	}
	public String getSiteTitle() {
		return SiteTitle;
	}
	public void setSiteTitle(String siteTitle) {
		SiteTitle = siteTitle;
	}
	public String getSiteName() {
		return SiteName;
	}
	public void setSiteName(String siteName) {
		SiteName = siteName;
	}
	public String getSiteUrl() {
		return SiteUrl;
	}
	public void setSiteUrl(String siteUrl) {
		SiteUrl = siteUrl;
	}
	public String getSitekey() {
		return Sitekey;
	}
	public void setSitekey(String sitekey) {
		Sitekey = sitekey;
	}
	public String getSitedes() {
		return Sitedes;
	}
	public void setSitedes(String sitedes) {
		Sitedes = sitedes;
	}
	public String getEnterpriseMail() {
		return EnterpriseMail;
	}
	public void setEnterpriseMail(String enterpriseMail) {
		EnterpriseMail = enterpriseMail;
	}
	public String getLogoUrl() {
		return LogoUrl;
	}
	public void setLogoUrl(String logoUrl) {
		LogoUrl = logoUrl;
	}
	public String getWebmasterName() {
		return WebmasterName;
	}
	public void setWebmasterName(String webmasterName) {
		WebmasterName = webmasterName;
	}
	public String getWebmasterEmail() {
		return WebmasterEmail;
	}
	public void setWebmasterEmail(String webmasterEmail) {
		WebmasterEmail = webmasterEmail;
	}
	public String getCopyright() {
		return Copyright;
	}
	public void setCopyright(String copyright) {
		Copyright = copyright;
	}
	public int getMaxPerPage_Default() {
		return MaxPerPage_Default;
	}
	public void setMaxPerPage_Default(int maxPerPage_Default) {
		MaxPerPage_Default = maxPerPage_Default;
	}
	public int getNew_count() {
		return New_count;
	}
	public void setNew_count(int new_count) {
		New_count = new_count;
	}
	public int getProduct_count() {
		return Product_count;
	}
	public void setProduct_count(int product_count) {
		Product_count = product_count;
	}
	public int getMaxPerPage_Search() {
		return MaxPerPage_Search;
	}
	public void setMaxPerPage_Search(int maxPerPage_Search) {
		MaxPerPage_Search = maxPerPage_Search;
	}
	public int getMaxPerPage_Content() {
		return MaxPerPage_Content;
	}
	public void setMaxPerPage_Content(int maxPerPage_Content) {
		MaxPerPage_Content = maxPerPage_Content;
	}
	public boolean isNewsComment() {
		return NewsComment;
	}
	public void setNewsComment(boolean newsComment) {
		NewsComment = newsComment;
	}
	public boolean isEnableProductCheck() {
		return EnableProductCheck;
	}
	public void setEnableProductCheck(boolean enableProductCheck) {
		EnableProductCheck = enableProductCheck;
	}
	public boolean isEnableUploadFile() {
		return EnableUploadFile;
	}
	public void setEnableUploadFile(boolean enableUploadFile) {
		EnableUploadFile = enableUploadFile;
	}
	public boolean isPopAnnounce() {
		return PopAnnounce;
	}
	public void setPopAnnounce(boolean popAnnounce) {
		PopAnnounce = popAnnounce;
	}
	public int getHitsOfHot() {
		return HitsOfHot;
	}
	public void setHitsOfHot(int hitsOfHot) {
		HitsOfHot = hitsOfHot;
	}
	public int getMaxFileSize() {
		return MaxFileSize;
	}
	public void setMaxFileSize(int maxFileSize) {
		MaxFileSize = maxFileSize;
	}
	public String getSavaUpFilesPath() {
		return SavaUpFilesPath;
	}
	public void setSavaUpFilesPath(String savaUpFilesPath) {
		SavaUpFilesPath = savaUpFilesPath;
	}
	public String getUpFileType() {
		return UpFileType;
	}
	public void setUpFileType(String upFileType) {
		this.UpFileType = upFileType;
	}
	public boolean isDelUpFiles() {
		return DelUpFiles;
	}
	public void setDelUpFiles(boolean delUpFiles) {
		DelUpFiles = delUpFiles;
	}
	public int getSessionTimeout() {
		return SessionTimeout;
	}
	public void setSessionTimeout(int sessionTimeout) {
		SessionTimeout = sessionTimeout;
	}
	public XmlConfigure getConfigure() {
		return configure;
	}
	public void setConfigure(XmlConfigure configure) {
		this.configure = configure;
	}
	
	

}
